package com.unicom.scg.scancodego.service.impl;

import com.unicom.scg.scancodego.entity.TStaff;
import com.unicom.scg.scancodego.entity.TStaffExample;
import com.unicom.scg.scancodego.mapper.TStaffMapper;
import com.unicom.scg.scancodego.service.TstaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liyy22
 * @version 1.0
 * @date 2019/10/30 11:44
 */
@Service
public class TstaffServiceimpl implements TstaffService {
    @Autowired
    TStaffMapper tStaffMapper;

    @Override
    public TStaff selectById(String staffId) {
        TStaff tStaff = tStaffMapper.selectByPrimaryKey(staffId);

        return tStaff;
    }

    @Override
    public List<TStaff> getAllUsers() {
        TStaffExample tStaffExample = new TStaffExample();
        //example.createCriteria().andPositionEqualTo();
        List<TStaff> tStaffs = tStaffMapper.selectByExample(tStaffExample);
        return tStaffs;
    }


}
